// 其他正常工费申请

import ApiWorkflow from "@/api/workflow";
import ListView from "@/components/app/ListView";
import { TodoFeesCard } from "@/components/app/TodoCard";
import useList from "@/hooks/useList";

export default ({ intentCustomerId }: { intentCustomerId: number }) => {
  const { loading, list } = useList<any>(ApiWorkflow.todos, {
    defaultParams: [{ intentCustomerId, itemType: 4 }],
  });

  return (
    <ListView
      loading={loading}
      isEmpty={list.length == 0}
      emptyText="暂无可申请项"
    >
      {list.map((item) => (
        <TodoFeesCard pure source={item} key={item.id} />
      ))}
    </ListView>
  );
};
